<!DOCTYPE html>
<html lang="en">





<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon.png">
  <link rel="icon" type="image/png" href="/img/favicon.png">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="My Personal Website For Blog">
  <meta name="author" content="黄宇辉">
  <meta name="keywords" content="learning note,hexo blog">
  <title>vsblog : 一个采用vue及springboot开发的超简洁的个人博客系统 - 欢迎参观小灰灰的网站哟 ヾ(◍°∇°◍)ﾉﾞ ~</title>

  <link  rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.staticfile.org/github-markdown-css/4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    <link  rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/10.0.0/styles/vs2015.min.css" />
  

  


<!-- 主题依赖的图标库，不要自行修改 -->
<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_yg9cfy8wd6.css">

<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_pjno9b9zyxs.css">

<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script  src="/js/utils.js" ></script>
</head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>ANONYMOUS</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                Home
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                Archives
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                Tags
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                About
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="view intro-2" id="background" parallax=true
         style="background: url('/img/default.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="container text-center white-text fadeInUp">
            <span class="h2" id="subtitle">
              
            </span>

            
              
  <div class="mt-3 post-meta">
    <i class="iconfont icon-date-fill" aria-hidden="true"></i>
    <time datetime="2020-06-21 12:23">
      June 21, 2020 pm
    </time>
  </div>


<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      570 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      9
       分钟
    </span>
  

  
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid">
  <div class="row">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-md">
      <div class="container nopadding-md" id="board-ctn">
        <div class="py-5" id="board">
          <div class="post-content mx-auto" id="post">
            
            <article class="markdown-body">
              <h2 id="README-md"><a href="#README-md" class="headerlink" title="README.md"></a>README.md</h2><p><em>最近在学习前后端分离开发模式，为了总结进而写了这个小项目 : <a href="http://49.233.79.152:8080" target="_blank" rel="noopener">http://49.233.79.152:8080</a></em></p>
<blockquote>
<p>账号: <code>admin</code>，密码: <code>iblog.run</code> ( 拜托不要删除我的数据，请另行创建文章后测试 )</p>
</blockquote>
<blockquote>
<p>github repo : <em><a href="https://github.com/YUbuntu0109/vsblog" target="_blank" rel="noopener">https://github.com/YUbuntu0109/vsblog</a></em></p>
</blockquote>
<h3 id="技术"><a href="#技术" class="headerlink" title="技术"></a>技术</h3><p><code>前端</code> : </p>
<ul>
<li>element-ui</li>
<li>axios</li>
<li>vue</li>
</ul>
<p><code>后端</code> : </p>
<ul>
<li>hibernate validatior</li>
<li>mybatis plus</li>
<li>springboot</li>
<li>mysql</li>
<li>shiro</li>
<li>redis</li>
<li>jwt</li>
</ul>
<h3 id="截图"><a href="#截图" class="headerlink" title="截图"></a>截图</h3><p><img src="/2020/06/21/vsblog-%E4%B8%80%E4%B8%AA%E9%87%87%E7%94%A8vue%E5%8F%8Aspringboot%E5%BC%80%E5%8F%91%E7%9A%84%E8%B6%85%E7%AE%80%E6%B4%81%E7%9A%84%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E7%B3%BB%E7%BB%9F/index-screenshot.png" srcset="/img/loading.gif" alt=" "></p>
<h3 id="功能"><a href="#功能" class="headerlink" title="功能"></a>功能</h3><ul>
<li><input checked disabled type="checkbox"> 登录验证</li>
<li><input checked disabled type="checkbox"> 文章展示</li>
<li><input checked disabled type="checkbox"> 文章添加</li>
<li><input checked disabled type="checkbox"> 文章删除</li>
<li><input checked disabled type="checkbox"> 文章修改</li>
<li><input checked disabled type="checkbox"> 文章查找</li>
<li><input checked disabled type="checkbox"> 文章归档</li>
<li><input checked disabled type="checkbox"> 页面特效</li>
<li><input checked disabled type="checkbox"> 点击特效</li>
<li><input disabled type="checkbox"> 文章分类</li>
<li><input disabled type="checkbox"> 友链</li>
<li><input disabled type="checkbox"> 留言</li>
</ul>
<h3 id="部署"><a href="#部署" class="headerlink" title="部署"></a>部署</h3><blockquote>
<p><em>以下是我在 <code>Ubuntu18.04</code> 远程服务器上部署 <code>vsblog</code> 的流程.</em></p>
</blockquote>
<ol>
<li><p>安装 JDK</p>
<div class="hljs"><pre><code class="hljs shell"><span class="hljs-meta">#</span><span class="bash"> install jdk</span>
sudo apt install openjdk-8-jdk-headless
<span class="hljs-meta">
#</span><span class="bash"> check</span>
java -version</code></pre></div>
</li>
<li><p>安装 MySQL8.0+</p>
<div class="hljs"><pre><code class="hljs shell"><span class="hljs-meta">#</span><span class="bash"> the installation package as follows you need to download it</span>
<span class="hljs-meta">#</span><span class="bash"> decompress the installation package</span>
sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb
<span class="hljs-meta">
#</span><span class="bash"> update installation package</span>
sudo apt update 
<span class="hljs-meta">
#</span><span class="bash"> install mysql server</span>
sudo apt install mysql-server 
<span class="hljs-meta">
#</span><span class="bash"> run mysql</span>
mysql -u root -p</code></pre></div>
</li>
<li><p>安装 Redis</p>
<div class="hljs"><pre><code class="hljs shell"><span class="hljs-meta">#</span><span class="bash"> install redis server</span>
sudo apt-get install redis-server
<span class="hljs-meta">
#</span><span class="bash"> check redis server status</span>
netstat -nlt|grep 6379
<span class="hljs-meta">
#</span><span class="bash"> <span class="hljs-built_in">test</span></span>
redis-cli</code></pre></div>
</li>
<li><p>导入 <code>vueblog.sql</code> 数据库</p>
<div class="hljs"><pre><code class="hljs shell"><span class="hljs-meta">#</span><span class="bash"> mysql -u root -p &lt; vueblog.sql</span>
mysql -u root -p &lt; 'the specified path of database file'</code></pre></div>
</li>
<li><p>运行项目</p>
<div class="hljs"><pre><code class="hljs shell"><span class="hljs-meta">#</span><span class="bash"> <span class="hljs-built_in">kill</span> the specified server port:8080</span>
kill -9 $(netstat -nlp | grep :8080 | awk '&#123;print $7&#125;' | awk -F"/" '&#123; print $1 &#125;')
<span class="hljs-meta">
#</span><span class="bash"> run</span>
<span class="hljs-meta">#</span><span class="bash"> nohup /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar /tmp/vueblog-0.0.1-SNAPSHOT.jar &gt; vsblog.file 2&gt;&amp;1 &amp;</span>
nuhup -jar vueblog-0.0.1-SNAPSHOT.jar &gt; vsblog.file 2&gt;&amp;1 &amp;
<span class="hljs-meta">
#</span><span class="bash"> <span class="hljs-built_in">test</span></span>
http://ip:8080/</code></pre></div>
</li>
<li><p>绑定域名</p>
</li>
</ol>
<p><em>忽略端口号，例如 : <a href="http://vue.iblog.run:8080" target="_blank" rel="noopener">http://vue.iblog.run:8080</a> -&gt; <a href="http://vue.iblog.run" target="_blank" rel="noopener">http://vue.iblog.run</a></em></p>
<div class="hljs"><pre><code class="hljs shell"><span class="hljs-meta">#</span><span class="bash"> first you need install the nginx</span>
sudo apt install nginx
<span class="hljs-meta">
#</span><span class="bash"> vim /etc/nginx/nginx.conf</span>
<span class="hljs-meta">#</span><span class="bash"> such as the example configuraion be added as follows</span>
http&#123;
    server&#123;
	    listen  80;
        server_name  vue.iblog.run; 
        location / &#123;
		    proxy_pass  http://ip:8080;	
	    &#125;            
	&#125;
&#125;
. . .
<span class="hljs-meta">
#</span><span class="bash"> <span class="hljs-keyword">then</span> check the default configuration file</span>
nginx -t
<span class="hljs-meta">
#</span><span class="bash"> reload the nginx</span>
nginx -s reload
<span class="hljs-meta">
#</span><span class="bash"> <span class="hljs-built_in">test</span></span>
http://vue.iblog.run</code></pre></div>


<h3 id="注意事项"><a href="#注意事项" class="headerlink" title="注意事项"></a>注意事项</h3><h4 id="若需本地运行该项目，请修改如下配置"><a href="#若需本地运行该项目，请修改如下配置" class="headerlink" title="若需本地运行该项目，请修改如下配置 :"></a>若需本地运行该项目，请修改如下配置 :</h4><ol>
<li><p>前端 : <code>axios.js</code></p>
<div class="hljs"><pre><code class="hljs js"><span class="hljs-comment">// 自定义全局请求头(后台)</span>
<span class="hljs-comment">// axios.defaults.baseURL = "http://49.233.79.152:8080"</span>
axios.defaults.baseURL = <span class="hljs-string">"http://localhost:8080"</span></code></pre></div>
</li>
<li><p>后端 : <code>application.yml</code></p>
<div class="hljs"><pre><code class="hljs js">redis-manager:
	<span class="hljs-comment">// host: 49.233.79.152:6379</span>
	host: <span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span>:<span class="hljs-number">6379</span></code></pre></div>

</li>
</ol>
<h4 id="该项目使用的-MySQL-的版本号为-8-0-11-如果你的数据库版本低于它，请修改如下配置"><a href="#该项目使用的-MySQL-的版本号为-8-0-11-如果你的数据库版本低于它，请修改如下配置" class="headerlink" title="该项目使用的 MySQL 的版本号为 8.0.11 ,如果你的数据库版本低于它，请修改如下配置 :"></a>该项目使用的 MySQL 的版本号为 <code>8.0.11</code> ,如果你的数据库版本低于它，请修改如下配置 :</h4><ol>
<li><code>pom.xml</code> : 修改 mysql-connector-java 的版本</li>
<li><code>application.yml</code> : 将 driver-class-name 修改为 com.mysql.jdbc.Driver</li>
</ol>
<blockquote>
<p>详情请参考我的博文 : <a href="https://ishacker.net/2019/03/14/JDBC-%E5%B8%B8%E8%A7%81%E9%94%99%E8%AF%AF%E5%88%86%E6%9E%90/" target="_blank" rel="noopener">JDBC-常见错误分析</a></p>
</blockquote>
<h3 id="致谢"><a href="#致谢" class="headerlink" title="致谢"></a>致谢</h3><ul>
<li><a href="https://github.com/lenve/VBlog" target="_blank" rel="noopener">VBlog</a></li>
<li><a href="https://space.bilibili.com/13491144" target="_blank" rel="noopener">MarkerHub</a></li>
</ul>

            </article>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/Vue/">Vue</a>
                    
                      <a class="hover-with-bg" href="/tags/Spring-Boot/">Spring Boot</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" target="_blank" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！</p>
              
              
                <div class="post-prevnext row">
                  <div class="post-prev col-6">
                    
                    
                      <a href="/2020/06/21/error-java-net-SocketException-Permission-denied/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">error : java.net.SocketException: Permission denied</span>
                        <span class="visible-mobile">Previous</span>
                      </a>
                    
                  </div>
                  <div class="post-next col-6">
                    
                    
                      <a href="/2020/06/21/image-repo/">
                        <span class="hidden-mobile">image repo</span>
                        <span class="visible-mobile">Next</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </div>
                </div>
              
            </div>

            
          </div>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;TOC</p>
  <div id="tocbot"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    
  </main>

  
    <a id="scroll-top-button" href="#" role="button">
      <i class="iconfont icon-arrowup" aria-hidden="true"></i>
    </a>
  

  
    <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">Search</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">keyword</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
  

  

  

  <footer class="mt-5">
  <div class="text-center py-3">
    <div>
      <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a>
      <i class="iconfont icon-love"></i>
      <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener">
        <span>Fluid</span></a>
    </div>
    
  <div class="statistics">
    
    

    
      
        <!-- 不蒜子统计PV -->
        <span id="busuanzi_container_site_pv" style="display: none">
            总访问量 
            <span id="busuanzi_value_site_pv"></span>
             次
          </span>
      
      
        <!-- 不蒜子统计UV -->
        <span id="busuanzi_container_site_uv" style="display: none">
            总访客数 
            <span id="busuanzi_value_site_uv"></span>
             人
          </span>
      
    
  </div>


    

    
  </div>
</footer>

<!-- SCRIPTS -->
<script  src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js" ></script>
<script  src="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/js/bootstrap.min.js" ></script>
<script  src="/js/debouncer.js" ></script>
<script  src="/js/main.js" ></script>

<!-- Plugins -->


  
    <script  src="/js/lazyload.js" ></script>
  



  <script defer src="https://cdn.staticfile.org/clipboard.js/2.0.6/clipboard.min.js" ></script>
  <script  src="/js/clipboard-use.js" ></script>



  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>





  <script  src="https://cdn.staticfile.org/tocbot/4.11.1/tocbot.min.js" ></script>
  <script>
    $(document).ready(function () {
      var boardCtn = $('#board-ctn');
      var boardTop = boardCtn.offset().top;

      tocbot.init({
        tocSelector: '#tocbot',
        contentSelector: 'article.markdown-body',
        headingSelector: 'h1,h2,h3,h4,h5,h6',
        linkClass: 'tocbot-link',
        activeLinkClass: 'tocbot-active-link',
        listClass: 'tocbot-list',
        isCollapsedClass: 'tocbot-is-collapsed',
        collapsibleClass: 'tocbot-is-collapsible',
        collapseDepth: 0,
        scrollSmooth: true,
        headingsOffset: -boardTop
      });
      if ($('.toc-list-item').length > 0) {
        $('#toc').css('visibility', 'visible');
      }
    });
  </script>



  <script  src="https://cdn.staticfile.org/typed.js/2.0.11/typed.min.js" ></script>
  <script>
    var typed = new Typed('#subtitle', {
      strings: [
        '  ',
        "vsblog : 一个采用vue及springboot开发的超简洁的个人博客系统&nbsp;",
      ],
      cursorChar: "_",
      typeSpeed: 70,
      loop: false,
    });
    typed.stop();
    $(document).ready(function () {
      $(".typed-cursor").addClass("h2");
      typed.start();
    });
  </script>



  <script  src="https://cdn.staticfile.org/anchor-js/4.2.2/anchor.min.js" ></script>
  <script>
    anchors.options = {
      placement: "right",
      visible: "hover",
      
    };
    var el = "h1,h2,h3,h4,h5,h6".split(",");
    var res = [];
    for (item of el) {
      res.push(".markdown-body > " + item)
    }
    anchors.add(res.join(", "))
  </script>



  <script  src="/js/local-search.js" ></script>
  <script>
    var path = "/local-search.xml";
    var inputArea = document.querySelector("#local-search-input");
    inputArea.onclick = function () {
      searchFunc(path, 'local-search-input', 'local-search-result');
      this.onclick = null
    }
  </script>



  <script  src="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.css" />

  <script>
    $('#post img:not(.no-zoom img, img[no-zoom]), img[zoom]').each(
      function () {
        var element = document.createElement('a');
        $(element).attr('data-fancybox', 'images');
        $(element).attr('href', $(this).attr('src'));
        $(this).wrap(element);
      }
    );
  </script>







  
  
    <script>
      !function (e, t, a) {
        function r() {
          for (var e = 0; e < s.length; e++) s[e].alpha <= 0 ? (t.body.removeChild(s[e].el), s.splice(e, 1)) : (s[e].y--, s[e].scale += .004, s[e].alpha -= .013, s[e].el.style.cssText = "left:" + s[e].x + "px;top:" + s[e].y + "px;opacity:" + s[e].alpha + ";transform:scale(" + s[e].scale + "," + s[e].scale + ") rotate(45deg);background:" + s[e].color + ";z-index:99999");
          requestAnimationFrame(r)
        }

        function n() {
          var t = "function" == typeof e.onclick && e.onclick;
          e.onclick = function (e) {
            t && t(), o(e)
          }
        }

        function o(e) {
          var a = t.createElement("div");
          a.className = "heart", s.push({
            el: a,
            x: e.clientX - 5,
            y: e.clientY - 5,
            scale: 1,
            alpha: 1,
            color: c()
          }), t.body.appendChild(a)
        }

        function i(e) {
          var a = t.createElement("style");
          a.type = "text/css";
          try {
            a.appendChild(t.createTextNode(e))
          } catch (t) {
            a.styleSheet.cssText = e
          }
          t.getElementsByTagName("head")[0].appendChild(a)
        }

        function c() {
          return "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + ")"
        }

        var s = [];
        e.requestAnimationFrame = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function (e) {
          setTimeout(e, 1e3 / 60)
        }, i(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"), n(), r()
      }(window, document);
    </script>
  














</body>
</html>
